<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <child :foo="msg"></child>
</div>
<script src="vue.js"></script>
<script>
    var vm = new Vue({
        el: '#app',
        data: {
            msg: '父组件中的数据'
        },
        components: {
            child: {
                props:['foo'],
                template: `
                    <h1>
                    子组件中的内容:{{foo}}--{{abc}}
                    </h1>
                    `,
                data(){
                    return{
                        abc:'bcd'
                    }
                }
            }
        }
    })
</script>
</body>
</html>